package com.wyh.product.controller;

import com.wyh.product.model.DO.ProductInfo;
import com.wyh.product.service.ProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/product")
@RestController
public class ProductInfoController {
    @Autowired
    ProductInfoService productInfoService;

    @RequestMapping("/{productId}")
    public ProductInfo selectProductById(@PathVariable("productId") Integer productId){
        return productInfoService.selectProductById(productId);
    }
}
